package com.ler.yrmall.order.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ler.yrmall.basic.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 订单项信息
 * @author Leron
 */
@Data
@TableName("oms_order_item")
@EqualsAndHashCode(callSuper = true)
public class OrderItemEntity extends BaseEntity<OrderItemEntity> {

    /**
     * order_id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long orderId;

    /**
     * order_sn
     */
    private String orderSn;

    /**
     * spu_id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long spuId;

    /**
     * spu_name
     */
    private String spuName;

    /**
     * spu_pic
     */
    private String spuPic;

    /**
     * skuId
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long skuId;

    /**
     * skuName
     */
    private String skuName;

    /**
     * sku图片
     */
    private String skuPic;

    /**
     * 商品sku价格
     */
    private BigDecimal skuPrice;

    /**
     * 总金额
     */
    private BigDecimal totalAmount;

    /**
     * 商品购买的数量
     */
    private Integer skuQuantity;

    /**
     * 商品销售属性组合
     */
    private String skuAttrsVals;

    /**
     * 优惠券优惠分解金额
     */
    private BigDecimal couponAmount;

    /**
     * 积分优惠分解金额
     */
    private BigDecimal integrationAmount;

    /**
     * 该商品经过优惠后的分解金额
     */
    private BigDecimal realAmount;

    /**
     * 赠送积分
     */
    private Integer giftIntegration;

    /**
     * 赠送成长值
     */
    private Integer giftGrowth;

    /**
     * 备注
     */
    private String remark;

    /**
     * @see OrderEntity.OrderStatus
     */
    private Integer status;

}
